﻿<template>
    <div class="warn_container">
      
      <div :class="warn_class">
        
        <!-- <img src="../assets/danger.png"></img> -->
      </div>
    </div>
</template>

<script>
export default {
    data(){
        return{
           ifdanger:'',
           warn_class:'',
        }
    },
    methods:{
        danger(){
              this.$http("/ifdanger","get",null,true,function(resp){
            if(resp==0){
           this.warn_class=''

            }else{
           this.warn_class='warn_icon'
       }
        })


        }
      


    },
    mounted(){
        setInterval(this.danger, 300); 
      
    },
    created(){

    }
}
</script>

<style lang="scss" scoped>
    .warn_container{
        margin:0px;
        z-index:0;
        -moz-user-select:none; /*火狐*/
        -webkit-user-select:none; /*webkit浏览器*/
        -ms-user-select:none; /*IE10*/
        -khtml-user-select:none; /*早期浏览器*/
        user-select:none;

        background-image: url('../assets/bcgimg.png');
        box-sizing: border-box;
        width:1680px;
        height:100%;



    }
 
    .top{
        float: left;
        background: linear-gradient(to right, #ef2727, rgba(255, 0, 0, 0));
        width:50px;
        height:100%;
    }
    .warn_icon{
        float: none;
        position:relative;
        background-image: url('../assets/danger.png');

          width:155px;
        height: 140px;
        top:620px;
        left:670px;
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
      
       animation:myMove .5s infinite alternate linear;
	-moz-animation:myMove .5s infinite alternate linear;
	-webkit-animation:myMove .5s infinite alternate linear;
	-o-animation:myMove .5s infinite alternate linear;
}
@keyframes myMove{
	0%{transform:scale(.7)}
	100%{transform:scale(1)}
}
@-moz-keyframes myMove{
	0%{transform:scale(.7)}
	100%{transform:scale(1)}
}
@-webkit-keyframes myMove{
	0%{transform:scale(.7)}
	100%{transform:scale(1)}
}
@-o-keyframes myMove{
	0%{transform:scale(.7)}
	100%{transform:scale(1)}
}




</style>